import * as base from './base';


/**
 * 表名
 */
export let _tableName = 'newtable1';

export function query(sql,values,callback:(err,result)=>any){

    values['table'] = _tableName;

    base.query(sql,values,callback);
}

export function getUser(user,pass,callback:(result)=>any){

    let sql3 = "SELECT * FROM :table WHERE `user`=:user and `pass`=:pass";

    query(sql3,{"user":user,"pass":pass},(err,result)=>{
        callback(result);//这里只返回结果，数据获取层面的错误，在此处处理掉
        console.log(result);
    });
}
